package pojo;

import java.time.LocalDateTime;

/**
 * 急性病表实体类
 */
public class Jxb {
    private Integer id;             // 疾病ID
    private String name;            // 疾病名称
    private String category;        // 疾病分类
    private String highSeason;      // 高发季节
    private String description;     // 疾病简介
    private String cause;           // 病因
    private String prevention;      // 预防措施
    private String treatment;       // 治疗方式
    private Integer viewCount;      // 访问量
    private LocalDateTime createTime; // 创建时间
    private String trend;           // 流行趋势
    private Integer severity;       // 严重程度(0-100)
    private String coverImg;        // 封面图URL

    // Getter 和 Setter 方法
    public Integer getId() { return id; }
    public void setId(Integer id) { this.id = id; }

    public String getName() { return name; }
    public void setName(String name) { this.name = name; }

    public String getCategory() { return category; }
    public void setCategory(String category) { this.category = category; }

    public String getHighSeason() { return highSeason; }
    public void setHighSeason(String highSeason) { this.highSeason = highSeason; }

    public String getDescription() { return description; }
    public void setDescription(String description) { this.description = description; }

    public String getCause() { return cause; }
    public void setCause(String cause) { this.cause = cause; }

    public String getPrevention() { return prevention; }
    public void setPrevention(String prevention) { this.prevention = prevention; }

    public String getTreatment() { return treatment; }
    public void setTreatment(String treatment) { this.treatment = treatment; }

    public Integer getViewCount() {
        return viewCount != null ? viewCount : 0;
    }
    public void setViewCount(Integer viewCount) { this.viewCount = viewCount; }

    public LocalDateTime getCreateTime() { return createTime; }
    public void setCreateTime(LocalDateTime createTime) { this.createTime = createTime; }

    public String getTrend() { return trend; }
    public void setTrend(String trend) { this.trend = trend; }

    public Integer getSeverity() { return severity; }
    public void setSeverity(Integer severity) { this.severity = severity; }

    public String getCoverImg() { return coverImg; }
    public void setCoverImg(String coverImg) { this.coverImg = coverImg; }

    @Override
    public String toString() {
        return "Jxb{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", category='" + category + '\'' +
                ", highSeason='" + highSeason + '\'' +
                ", description='" + description + '\'' +
                ", cause='" + cause + '\'' +
                ", prevention='" + prevention + '\'' +
                ", treatment='" + treatment + '\'' +
                ", viewCount=" + viewCount +
                ", createTime=" + createTime +
                ", trend='" + trend + '\'' +
                ", severity=" + severity +
                ", coverImg='" + coverImg + '\'' +
                '}';
    }
}